home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm1
/
awebums.lha
/
awebmailtoums.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1996-05-07
|
2KB
|
76 lines
/* $VER: awebmailtoums.rexx 0.22 (07.05.96) */
/* by Lothar Bartsch (lbartsch@anjou.hb.provi.de) */
/* */
/* This script use mailto: with AWeb and UMS */
/* */
/* Usage: */
/* Select AWeb - Change Settings - */
/* Network 3: External programs */
/* Insert at mailto: */
/* Command sys:rexxc/rx */
/* Arguments awebmailtoums.rexx %s */
/* */
/* Change name,password and server in this skript */
/* Insert your configs here */
name = ""
password = ""
server = ""
editor = "ed sticky"
parse arg user '@' addr .
options results
CALL AddLib("rexxsupport.library", 0, -30, 0)
CALL AddLib("rexxreqtools.library", 0, -30, 0)
CALL AddLib("ums.library", 0, -210, 11)
CALL UMSInitConsts()
p=show('P',,)
if(pos('AWEB.', p) > 0) then awebport = word(substr(p, pos('AWEB.', p)), 1)
address (awebport)
'get url'
url = result
'get title'
title = result
subj = rtgetstring(title,"Insert a subject for this message:","AWebMailtoUMS")
IF rtresult = 0 THEN EXIT
msgfile = 't:.temp.'Pragma(ID)
SHELL command editor msgfile
IF ~EXISTS(msgfile) THEN EXIT
/* Login */
account = UMSLogin(name,password,server)
IF account = 0 THEN DO
EXIT 10
END
/* Write the message */
DROP msg.
msg.UMSCODE_MsgText_FILE = msgfile
msg.UMSCODE_ToAddr = user'@'addr
msg.UMSCODE_ToName = user
msg.UMSCODE_Subject = subj
msg.UMSCODE_RfcAttr = '"X-Url: '||url||'"'
num = UMSWriteMsg(account, msg.)
/* Logout */
IF account ~= 0 THEN DO
CALL UMSLogout(account)
account = 0
END
call delete(msgfile)
EXIT